home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / games / IndiZone / gold / seaClass.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.8 KB  |  94 lines

  1. /*
  2.  * The original copyright owners of the accompanying source code files have
  3.  * agreed to place such code into the public domain.  Accordingly, anyone
  4.  * who receives or obtains a copy of such source code is freely entitled to
  5.  * reproduce, use and otherwise exploit such code (including the right to
  6.  * make derivative works), at his/her own risk and expense, without any
  7.  * obligation or liability to the original copyright owners.
  8.  *
  9.  * We would appreciate (but do not require) that the following message be
  10.  * included in any derivative works:
  11.  *
  12.  * "Portions of this program were developed by Peter Broadwell, Rob Myers
  13.  * and Robin Schaufler while working in Silicon Valley."
  14.  *
  15.  * The accompanying source code files and related documentation materials
  16.  * are distributed on an "AS IS" basis, without any warranties or
  17.  * guarantees of any kind.  All implied warranties, including the implied
  18.  * warranties of merchantability and of fitness for any particular purpose,
  19.  * are expressly disclaimed.
  20.  */
  21. #include "gl.h"
  22. #include "geom.h"
  23. #include "selectors.h"
  24. #include "class.h"
  25. #include "classIds.h"
  26. #include "mbox.h"
  27. #include "individual.h"
  28. #include "behavior.h"
  29. #include "doers.h"
  30.  
  31. #include "sea.h"
  32. #include "colors.h"
  33.  
  34. extern class indivClass;
  35. model seaWeed;
  36. extern char *plantinit();
  37.  
  38. fcnTable seaTable[] = {
  39.     INIT,    plantinit,
  40.     EOTABLE,
  41. };
  42.  
  43. class seaClass = {
  44.     &indivClass,
  45.     seaTable,
  46.     sizeof(sea),
  47.     SEA,
  48. };
  49.  
  50. sea seaTemplate = {
  51.             /*   inst        */
  52.     &seaClass,        /* myClass pointer    */
  53.     NULL,        /* classFunctions     */
  54.     0,            /* nFunctions        */
  55.             /*   mailbox        */
  56.     NULL,        /* subscribers          */
  57.     NULL,        /* subscribedTo         */
  58.             /*   individual        */
  59.     {3000,500,-5000},    /* position        */
  60.     {0,0,0},        /* lastPosition        */
  61.     {1,0,0},        /* delta        */
  62.     {0,0,0},        /* velocity        */
  63.     {0,0,0},        /* avelocity        */
  64.     {0,0,0},        /* acceleration        */
  65.     1.0,        /* speed        */
  66.     {0,0,10},        /* heading        */
  67.     {0,900,0},        /* rotation        */
  68.     {0,0,0},        /* influence        */
  69.     1.0,        /* scale                */
  70.     &seaWeed,        /* model        */
  71.     NULL,        /* flags        */
  72.     NULL,        /* curVars        */
  73.     NULL,        /* controls        */
  74.             /*    sea        */
  75.     90,            /* length */
  76. };
  77.  
  78. model seaWeed = {
  79.     NULL,            /* next model segment          */
  80.     NULL,            /* child model segments        */
  81.     0,                /* geometry compiled yet?      */
  82.     0,                /* compiled geometry object Id */
  83.     NULL,            /* point dictionary            */
  84.     NULL,            /* polygon descriptions        */
  85.     { 0,0,0},            /* centroid                    */
  86.     SEAWEED_COLOR,        /* color                       */
  87.     SEAWEED_TEXTURE,        /* texture                     */
  88.     FALSE,            /* outlined                    */
  89.     {0,0,0},            /* rotation                */
  90.     {0,0,0},            /* translate                */
  91.     {1.0,1.0,1.0},        /* scale                */
  92.     60,                /* declasse               */
  93. };
  94.